﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Validator.Engine;

namespace Landscape.Business.Validators
{
    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter)]
    [ValidatorClass(typeof(DateAfterTodayValidator))]
    public class DateAfterTodayAttribute : Attribute, IRuleArgs
    {
        private string message = string.Empty;
        private string selectDate;

        public DateAfterTodayAttribute()
        {
            this.selectDate = DateTime.Now.ToLongTimeString();
        }       

        public string ReferenceDate
        {
            get { return selectDate; }
            set { this.selectDate = value; }
        }

        public string Message
        {
            get
            {
                return this.message;
            }
            set
            {
                this.message = value;
            }
        }
    }
}
